package com.mapproject.industrymap.controller;
import com.mapproject.industrymap.service.SysPublicDataCatalogService;
import com.mapproject.industrymap.service.SysDepartmentDataCatalogService;
import com.mapproject.industrymap.service.SysPersonalDataCatalogService;
import com.mapproject.industrymap.utils.ReturnValue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/data")
public class SysDataCatalogController {
    @Autowired
    SysPublicDataCatalogService sysPublicDataCatalogService;
    @Autowired
    SysDepartmentDataCatalogService sysDepartmentDataCatalogService;
    @Autowired
    SysPersonalDataCatalogService sysPersonalDataCatalogService;
    @RequestMapping("/getpubliccatalog")
    public ReturnValue getPublicDataCatalogInfo(@RequestParam(value = "publiclayer")String publiclayer){
        return sysPublicDataCatalogService.getPublicDataCatalogInfo(publiclayer);
    }

    @RequestMapping("/getdepartmentcatalog")
    public ReturnValue getDepartmentDataCatalogInfo(@RequestParam(value = "departmentlayer")String departmentlayer){
        return sysDepartmentDataCatalogService.getDepartmentDataCatalogInfo(departmentlayer);
    }


    @RequestMapping("/getpersonalcatalog")
    public ReturnValue getPersonalDataCatalogInfo(@RequestParam(value = "personallayer")String personallayer){
        return sysPersonalDataCatalogService.getPersonalDataCatalogInfo(personallayer);
    }
}
